﻿using System;
using System.Windows;
using System.Windows.Controls;
using Esponce.Models;

namespace Esponce.Views
{
	public partial class GenerateView : UserControl
	{
		public GenerateView()
		{
			InitializeComponent();

			this.Loaded += (sender, e) => btnGenerate.Focus();
		}

		public GenerateViewModel ViewModel
		{
			get
			{
				return this.DataContext as GenerateViewModel;
			}
		}

		private void btnGenerate_Click(object sender, RoutedEventArgs e)
		{
			ViewModel.Generate();
		}

		private void btnSave_Click(object sender, /* Routed */ EventArgs e)
		{
			ViewModel.SaveDialog();
		}
	}
}
